#pragma once

#include "head.h"
#include "task.h"

class TaskQueue{
private:
    size_t capacity_;
    size_t size_; 
    queue<Task *> tasks_;
    bool isRunning_ { true };

    mutex mtx_;
    condition_variable cond_;

public:
    TaskQueue(int capacity);
    ~TaskQueue(){};

    bool full();
    bool empty();
    int addTask(Task *task);
    Task *getTask();

    void wakeup();
};